<{include file="header.html"}>
<div class='title-nav'>评论列表</div>
<form action='' method='post'>
<div class='article-list'>
	<table cellspacing="0" cellpadding="0">
		<tr>
			<th><input type="checkbox" id="btu" value="全选" /></th>
			<th>作者</th>
			<th>内容</th>
			<th>时间</th>
			<th>邮箱</th>
			<th>网址</th>
			<th>IP地址</th>
			<th>审核</th>
		</tr>
		<{foreach from=$comment item=value}>
			<tr>
				<td><input name="a[]" type="checkbox" value="" /></td>
				<td><a href="/admin.php?c=Comment&a=show&poster=<{$value.poster}>" title='点击查看此用户所有评论'><{$value.poster}></a></td>
				<td><a href="/Article/show/id/<{$value.aid}>#comment-<{$value.cid}>" title='点击查看该评论在前台位置' target='_blank'><{$value.content|mb_substr:0:25:'utf-8'}>..</a></td>
				<td><{$value.date}></td>
				<td><{$value.email}></td>
				<td><a href="<{$value.url}>" title='点击查看该网址' target='_blank'><{$value.url}></a></td>
				<td><{$value.ip}></td>
				<td>
					<{if $value.hide eq n}>
						<a href="/admin.php?c=Comment&a=setHide&cid=<{$value.cid}>&hide=y" title='点击取消审核' style='color:green;font-size: 0.8em;padding: 5px; background: #EAEAEA;'>正常</a>
					<{else}>
						<a href="/admin.php?c=Comment&a=setHide&cid=<{$value.cid}>&hide=n" title='点击审核此评论' style='color:#c7254e;font-size: 0.8em;padding: 5px; background: #f9f2f4;'>未审核</a>
					<{/if}>
				</td>
			</tr>
		<{foreachelse}>
			<tr><td>暂无数据</td></tr>
		<{/foreach}>
	</table>
</div>
<div class='page'>
	<div class='page-left'>
		<select name='type'  class='sel'>
			<option value='-1' selected = "selected">选项</option>
			<option value='delete'>删除</option>
			<option value='unhide'>审核</option>
			<option value='hide'>取消审核</option>
		</select>
		<input type='submit' value='提交' onclick="return confirm('确定你的操作？')" class='sub' />
	</div>
	<div class='page-right'>
		<ul>
			<li> <a href="#" class='menu'>1</a></li>
			<li> <a href="#">2</a></li>
			<li> <a href="#">3</a></li>
			<li> <a href="#">4</a></li>
			<li> <a href="#">5</a></li>
			<li> <a href="#">》</a></li>
		</ul>
	</div>
</div>
</form>
<{include file="footer.html"}>
<script type="text/javascript">

	window.onload=function()
	{
		var arr =document.getElementsByTagName('input');
		var b = document.getElementById("btu");
		var iSelect=true;
		b.onclick=function()
		{
			if(iSelect==true)
			{
				for(var i=0;i<arr.length;i++)
				{
					arr[i].checked=true;
				}
				iSelect=false;
				b.value='反选';
			}
			else if(iSelect==false)
			{
				for(var i=0;i<arr.length;i++)
				{
					arr[i].checked=false;
				}
				iSelect=true;
				b.value='全选';
			}

		}
	}
</script>